package com.example.film.mapper;

import com.example.film.entity.InlandWeekChamp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface InlandWeekChampMapper {

    //查看内地票房历年单周冠军电影信息
    @Select("select id,filmName,link,picture,director,star,type,area,showYear,\n" +
            "score,brief,vidio1,platform1,vidio2,platform2,vidio3,platform3 from inlandweekchamp")
    List<InlandWeekChamp> findInlandWeekChamp();

    //分页查询内地票房历年单周冠军电影信息
    @Select("select id,filmName,link,picture,director,star,type,area,showYear,\n" +
            "score,brief,vidio1,platform1,vidio2,platform2,vidio3,platform3 from inlandweekchamp LIMIT #{pageSize} OFFSET #{startIndex}")
    List<InlandWeekChamp> findInlandWeekChampInfo(@Param("startIndex") Integer startIndex, @Param("pageSize") Integer pageSize);
}
